package com.wakala.employment.http.bean;


import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * 用户-职位 相关记录数据
 */

public class UserJobRecordVo implements Parcelable, Serializable {
    private static final long serialVersionUID = 8573120593261169347L;

    /**
     * 是否收藏
     */
    private Boolean hasCollect;

    protected UserJobRecordVo(Parcel in) {
        byte tmpHasCollect = in.readByte();
        hasCollect = tmpHasCollect == 0 ? null : tmpHasCollect == 1;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte((byte) (hasCollect == null ? 0 : hasCollect ? 1 : 2));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<UserJobRecordVo> CREATOR = new Creator<UserJobRecordVo>() {
        @Override
        public UserJobRecordVo createFromParcel(Parcel in) {
            return new UserJobRecordVo(in);
        }

        @Override
        public UserJobRecordVo[] newArray(int size) {
            return new UserJobRecordVo[size];
        }
    };

    public Boolean getHasCollect() {
        return hasCollect;
    }

    public void setHasCollect(Boolean hasCollect) {
        this.hasCollect = hasCollect;
    }
}
